package com.qf.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.admin.entity.Cart;
import com.qf.admin.mapper.ICartMapper2;
import com.qf.admin.service.ICartService2;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartServiceImpl2 implements ICartService2 {

    private ICartMapper2 cartMapper;

    public CartServiceImpl2(ICartMapper2 cartMapper) {
        this.cartMapper = cartMapper;
    }

    @Override
    public List<Cart> getReceiptCart(Integer id) {

        QueryWrapper queryWrapper = new QueryWrapper();

        queryWrapper.eq("u_id",id);

        List<Cart> cartList = cartMapper.selectList(queryWrapper);

        return cartList;
    }
}
